

//定义一个Person基类和子类Administrator、Student和Teacher。每个子类都应重写一个show方
//法来展示各自类型的信息。Main方法中创建这些类的实例，并调用一个register方法来展示每个人的信
//息。register方法应接受一个Person类型的参数

package Job.fortyOne;

public class Person {
    private String name;
    private int age;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void show(){
        System.out.println(name + ", " + age);
    }

}
